<template>
  <div class="webapp-box">
    <div class="menu">
      <div class="icon-item" v-for="(item,index) in funList" :key="index">
        <img class="icon-img" :src="item.icon"/>
        <span class="icon-name">{{ item.name }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'mallMenu',
  data() {
    return {
      funList: [{
        id: 1,
        name: "源码地址",
        icon: require('@/assets/images/theme/index-module/github-fill.png'),
        type: 2,
        url: 'https://gitee.com/leronx/dingdang-mall'
      },
        {
          id: 2,
          name: "领券中心",
          icon: require('@/assets/images/theme/index-module/youhuiquan.png'),
          type: 1
        },
        {
          id: 3,
          name: "积分商城",
          icon: require('@/assets/images/theme/index-module/jifenshangcheng.png'),
          type: 1
        },
        {
          id: 4,
          name: "秒杀专场",
          icon: require('@/assets/images/theme/index-module/seckill.png'),
          type: 1
        },
        {
          id: 5,
          name: "联系作者",
          icon: require('@/assets/images/theme/index-module/link.png'),
          type: 1
        },
        {
          id: 6,
          name: "热门爆款",
          icon: require('@/assets/images/theme/index-module/hot.png'),
          type: 1
        },
        {
          id: 7,
          name: "会员中心",
          icon: require('@/assets/images/theme/index-module/member-center.png'),
          type: 1
        },
        {
          id: 8,
          name: "每日签到",
          icon: require('@/assets/images/theme/index-module/qiandao.png'),
          type: 1
        },
        {
          id: 9,
          name: "店铺推荐",
          icon: require('@/assets/images/theme/index-module/icon-1.png'),
          type: 1
        },
        {
          id: 10,
          name: "分类",
          icon: require('@/assets/images/theme/index-module/category.png'),
          type: 1,
          url: '/pages/category/category'
        }
      ]
    }
  }
}
</script>

<style scoped>
.webapp-box {
  width: 320px;
  height: 160px;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.menu {
  background-color: white;
  width: 95%;
  height: 140px;
  border-radius: 5px;
  display: flex;
  flex-wrap: wrap;
  padding: 10px 0;
  margin: 10px auto 0;
}

.icon-item {
  width: 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.icon-img {
  width: 30px;
  height: 30px;
}

.icon-name {
  color: gray;
  margin-top: 5px;
  font-size: 10px;
}

</style>
